package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Permission;

import java.util.Set;

public interface PermissionDao {
    Set<Permission> findByRoleId(Integer id);

    Page<Permission> findByCondition(String name);

    //查询是否同名
    Integer findCountByName(String name);

    //查询关键字是否相同
    Integer findCountByKeyword(String keyword);

    //新增权限
    Integer add(Permission permission);

    //修改权限
    Integer edit(Permission permission);


    Integer findRoleByPermissionId(Integer id);

    Integer deleteById(Integer id);

    Permission findById(Integer id);
}
